package com.iteaj.demo.listener;

import com.iteaj.network.event.ExceptionEvent;
import com.iteaj.network.event.ExceptionEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class ExceptionListener implements ExceptionEventListener {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void onApplicationEvent(ExceptionEvent event) {
        logger.error("平台事件监听 异常事件 - 设备编号: {}", event.getDeviceSn(), event.getSource());
    }
}
